//#define __DEBUG__
// by Xeno
#define THIS_FILE "fn_placedobjan.sqf"
#include "x_setup.sqf"

if (GVAR(string_player) == _this) then {
	if (GVAR(player_is_medic)) then {
		_m_name = "Mash " + _this;
		[QGVAR(w_ma),_m_name] call FUNC(NetCallEventToClients);
		__pSetVar [QGVAR(medtent), []];
		_medic_tent = __pGetVar(medic_tent);
		if (!isNil "_medic_tent" && {!isNull _medic_tent}) then {deleteVehicle _medic_tent};
		__pSetVar ["medic_tent", objNull];
		systemChat (localize "STR_DOM_MISSIONSTRING_656");
	};
	if (GVAR(player_can_build_mgnest)) then {
		_m_name = "MG Nest " + _this;
		[QGVAR(w_ma),_m_name] call FUNC(NetCallEventToClients);
		__pSetVar [QGVAR(mgnest_pos), []];
		_mg_nest = __pGetVar(mg_nest);
		if (!isNil "_mg_nest" && {!isNull _mg_nest}) then {deleteVehicle _mg_nest};
		__pSetVar ["mg_nest", objNull];
		systemChat (localize "STR_DOM_MISSIONSTRING_657");
	};
	if (GVAR(eng_can_repfuel)) then {
		_m_name = "FARP " + _this;
		[QGVAR(w_ma),_m_name] call FUNC(NetCallEventToClients);
		__pSetVar [QGVAR(farp_pos), []];
		_farp = __pGetVar(GVAR(farp_obj));
		if (!isNil "_farp" && {!isNull _farp}) then {deleteVehicle _farp};
		__pSetVar [QGVAR(farp_obj), objNull];
		systemChat (localize "STR_DOM_MISSIONSTRING_658");
	};
};